/**
 * Copyright 2021 Huawei Technologies Co., Ltd
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
#ifndef MINDSPORE_LITE_TYPES_H
#define MINDSPORE_LITE_TYPES_H
#include <string>
namespace mindspore {
namespace lite {

struct QuantParam {
  int32_t zeroPoint;
  double scale;
  int numBits;
};

enum DataType : int8_t {
  DATA_TYPE_UNKNOWN = 0,
  DATA_TYPE_BOOL = 30,
  DATA_TYPE_INT8 = 32,
  DATA_TYPE_INT16 = 33,
  DATA_TYPE_INT32 = 34,
  DATA_TYPE_INT64 = 35,
  DATA_TYPE_UINT8 = 37,
  DATA_TYPE_UINT16 = 38,
  DATA_TYPE_UINT32 = 39,
  DATA_TYPE_UINT64 = 40,
  DATA_TYPE_FLOAT16 = 42,
  DATA_TYPE_FLOAT32 = 43,
  DATA_TYPE_FLOAT64 = 44,
};

enum Format : int8_t {
  FORMAT_NCHW = 0,
  FORMAT_NHWC = 1,
  FORMAT_NHWC4 = 2,
  FORMAT_HWKC = 3,
  FORMAT_HWCK = 4,
  FORMAT_KCHW = 5,
  FORMAT_CKHW = 6,
  FORMAT_KHWC = 7,
  FORMAT_CHWK = 8,
  FORMAT_HW = 9,
  FORMAT_HW4 = 10,
  FORMAT_NC = 11,
  FORMAT_NC4 = 12,
  FORMAT_NC4HW4 = 13,
  FORMAT_NUM_OF_FORMAT = 14,
  FORMAT_NCDHW = 15,
  FORMAT_NWC = 16,
  FORMAT_NCW = 17,
  FORMAT_NC8HW8 = 18,
  FORMAT_MIN = FORMAT_NCHW,
  FORMAT_MAX = FORMAT_NC8HW8
};

enum QuantType : int8_t {
  QUANT_TYPE_NONE = 0,
  QUANT_TYPE_AWARETRAINING = 1,
  QUANT_TYPE_WEIGHTQUANT = 2,
  QUANT_TYPE_POSTTRAINING = 3,
  QUANT_TYPE_WEIGHT = 4,
  QUANT_TYPE_ALL = 5,
  QUANT_TYPE_DYNAMIC = 6
};

enum NodeType : uint32_t {
  NODE_TYPE_NONE = 0,
  NODE_TYPE_ABS = 1,
  NODE_TYPE_ACTIVATION = 2,
  NODE_TYPE_ADD_FUSION = 5,
  NODE_TYPE_ALL = 9,
  NODE_TYPE_ARGMAX_FUSION = 11,
  NODE_TYPE_ASSERT = 13,
  NODE_TYPE_AVG_POOL_FUSION = 17,
  NODE_TYPE_BATCH_TO_SPACE = 21,
  NODE_TYPE_BATCH_TO_SPACE_ND = 22,
  NODE_TYPE_BIAS_ADD = 23,
  NODE_TYPE_BROADCAST_TO = 27,
  NODE_TYPE_CAST = 28,
  NODE_TYPE_CEIL = 29,
  NODE_TYPE_CLIP = 30,
  NODE_TYPE_CONCAT = 31,
  NODE_TYPE_CONV2D_FUSION = 35,
  NODE_TYPE_CONV2D_TRANSPOSE_FUSION = 36,
  NODE_TYPE_COS = 37,
  NODE_TYPE_CONSTANT_OF_SHAPE = 38,
  NODE_TYPE_CROP = 39,
  NODE_TYPE_DEPEND = 44,
  NODE_TYPE_DEPTH_TO_SPACE = 45,
  NODE_TYPE_DETECTION_POST_PROCESS = 46,
  NODE_TYPE_DIV_FUSION = 47,
  NODE_TYPE_DROPOUT = 49,
  NODE_TYPE_ELU = 51,
  NODE_TYPE_ELTWISE = 52,
  NODE_TYPE_EQUAL = 53,
  NODE_TYPE_EMBEDDING_LOOKUP_FUSION = 54,
  NODE_TYPE_EXPFUSION = 55,
  NODE_TYPE_EXPAND_DIMS = 56,
  NODE_TYPE_FAKE_QUANT_WITH_MIN_MAX_VARS = 57,
  NODE_TYPE_FAKE_QUANT_WITH_MIN_MAX_VARS_PER_CHANNEL = 58,
  NODE_TYPE_FFT_REAL = 59,
  NODE_TYPE_FFT_IMAG = 60,
  NODE_TYPE_FLATTEN = 61,
  NODE_TYPE_FLOOR = 63,
  NODE_TYPE_FLOOR_DIV = 64,
  NODE_TYPE_FLOOR_MOD = 65,
  NODE_TYPE_FILL = 66,
  NODE_TYPE_FULL_CONNECTION = 67,
  NODE_TYPE_FUSED_BATCH_NORM = 68,
  NODE_TYPE_GATHER = 69,
  NODE_TYPE_GATHER_ND = 70,
  NODE_TYPE_GREATER = 71,
  NODE_TYPE_GREATER_EQUAL = 72,
  NODE_TYPE_HASHTABLE_LOOKUP = 73,
  NODE_TYPE_INSTANCE_NORM = 74,
  NODE_TYPE_LAYER_NORM_FUSION = 75,
  NODE_TYPE_LEAKY_RELU = 76,
  NODE_TYPE_LESS = 77,
  NODE_TYPE_LESS_EQUAL = 78,
  NODE_TYPE_LOG = 79,
  NODE_TYPE_LOGICAL_AND = 81,
  NODE_TYPE_LOGICAL_NOT = 82,
  NODE_TYPE_LOGICAL_OR = 83,
  NODE_TYPE_LP_NORMALIZATION = 84,
  NODE_TYPE_L_R_N = 85,
  NODE_TYPE_LSH_PROJECTION = 86,
  NODE_TYPE_LSTM = 87,
  NODE_TYPE_L2_NORMALIZE_FUSION = 88,
  NODE_TYPE_MATMUL_FUSION = 89,
  NODE_TYPE_MAXIMUM = 90,
  NODE_TYPE_MAX_POOL_FUSION = 92,
  NODE_TYPE_SWITCH_LAYER = 94,
  NODE_TYPE_MFCC = 95,
  NODE_TYPE_MINIMUM = 96,
  NODE_TYPE_MOD = 98,
  NODE_TYPE_MUL_FUSION = 99,
  NODE_TYPE_NEG = 101,
  NODE_TYPE_NOT_EQUAL = 103,
  NODE_TYPE_NON_MAX_SUPPRESSION = 104,
  NODE_TYPE_ONE_HOT = 105,
  NODE_TYPE_ONES_LIKE = 106,
  NODE_TYPE_PAD_FUSION = 107,
  NODE_TYPE_PARTIAL_FUSION = 108,
  NODE_TYPE_POW_FUSION = 110,
  NODE_TYPE_PRIOR_BOX = 111,
  NODE_TYPE_PRELU_FUSION = 112,
  NODE_TYPE_QUANT_DTYPE_CAST = 113,
  NODE_TYPE_RANK = 114,
  NODE_TYPE_RANGE = 115,
  NODE_TYPE_RECIPROCAL = 116,
  NODE_TYPE_REAL_DIV = 117,
  NODE_TYPE_REDUCE_FUSION = 118,
  NODE_TYPE_RESHAPE = 119,
  NODE_TYPE_RESIZE = 120,
  NODE_TYPE_REVERSE_SEQUENCE = 121,
  NODE_TYPE_REVERSE_V2 = 122,
  NODE_TYPE_RFFT = 123,
  NODE_TYPE_R_O_I_POOLING = 124,
  NODE_TYPE_ROUND = 125,
  NODE_TYPE_RSQRT = 126,
  NODE_TYPE_SCALE_FUSION = 127,
  NODE_TYPE_SCATTER_ND = 128,
  NODE_TYPE_SHAPE = 130,
  NODE_TYPE_SIN = 133,
  NODE_TYPE_SKIP_GRAM = 134,
  NODE_TYPE_SLICE_FUSION = 135,
  NODE_TYPE_SOFTMAX = 138,
  NODE_TYPE_SPACE_TO_BATCH_ND = 141,
  NODE_TYPE_SPACE_TO_DEPTH = 142,
  NODE_TYPE_SPARSE_TO_DENSE = 144,
  NODE_TYPE_SPLIT = 145,
  NODE_TYPE_SQRT = 146,
  NODE_TYPE_SQUEEZE = 147,
  NODE_TYPE_SQUARE = 148,
  NODE_TYPE_SQUARED_DIFFERENCE = 149,
  NODE_TYPE_STACK = 150,
  NODE_TYPE_STRIDED_SLICE = 151,
  NODE_TYPE_SUB_FUSION = 152,
  NODE_TYPE_SWITCH = 154,
  NODE_TYPE_TILE_FUSION = 160,
  NODE_TYPE_TOPK_FUSION = 161,
  NODE_TYPE_TRANSPOSE = 162,
  NODE_TYPE_UNIQUE = 163,
  NODE_TYPE_UNSORTED_SEGMENT_SUM = 164,
  NODE_TYPE_UNSQUEEZE = 165,
  NODE_TYPE_UNSTACK = 166,
  NODE_TYPE_WHERE = 168,
  NODE_TYPE_ZEROS_LIKE = 169,
  NODE_TYPE_SELECT = 170,
  NODE_TYPE_G_R_U = 172,
  NODE_TYPE_NON_ZERO = 173,
  NODE_TYPE_INVERT_PERMUTATION = 174,
  NODE_TYPE_SIZE = 175,
  NODE_TYPE_RANDOM_STANDARD_NORMAL = 176,
  NODE_TYPE_CROP_AND_RESIZE = 177,
  NODE_TYPE_ERF = 178,
  NODE_TYPE_IS_FINITE = 180,
  NODE_TYPE_LIN_SPACE = 181,
  NODE_TYPE_UNIFORM_REAL = 182,
  NODE_TYPE_SPLICE = 188,
  NODE_TYPE_LOG_SOFTMAX = 189,
  NODE_TYPE_CALL = 190,
  NODE_TYPE_CUSTOM = 191,
  NODE_TYPE_CUM_SUM = 192,
  NODE_TYPE_SPLIT_WITH_OVERLAP = 193,
  NODE_TYPE_GEN_O_P = 194,
  NODE_TYPE_RAGGED_RANGE = 195,
  NODE_TYPE_G_L_U = 196,
  NODE_TYPE_AFFINE = 200,
  NODE_TYPE_ALL_GATHER = 201,
  NODE_TYPE_REDUCE_SCATTER = 202,
  NODE_TYPE_DYNAMIC_QUANT = 203,
  NODE_TYPE_RANDOM_NORMAL = 206,
  NODE_TYPE_FORMAT_TRANSPOSE = 209,
  NODE_TYPE_GATHER_D = 210,
  NODE_TYPE_GROUP_NORM_FUSION = 211,
  NODE_TYPE_LOG1P = 212,
  NODE_TYPE_SPARSE_FILL_EMPTY_ROWS = 214,
  NODE_TYPE_SPARSE_RESHAPE = 215,
  NODE_TYPE_SPARSE_SEGMENT_SUM = 216,
  NODE_TYPE_SCATTER_ELEMENTS = 217,
  NODE_TYPE_TRIU = 218,
  NODE_TYPE_TRIL = 219,
};

enum ResizeMethod : int8_t {
  RESIZE_METHOD_UNKNOWN = -1,
  RESIZE_METHOD_LINEAR = 0,
  RESIZE_METHOD_NEAREST = 1,
  RESIZE_METHOD_CUBIC = 2,
};

enum CoordinateTransformMode : int8_t {
  COORDINATE_TRANSFORM_MODE_ASYMMETRIC = 0,
  COORDINATE_TRANSFORM_MODE_ALIGN_CORNERS = 1,
  COORDINATE_TRANSFORM_MODE_HALF_PIXEL = 2,
};

enum NearestMode : int8_t {
  NEAREST_MODE_NORMAL = 0,
  NEAREST_MODE_ROUND_HALF_DOWN = 1,
  NEAREST_MODE_ROUND_HALF_UP = 2,
  NEAREST_MODE_FLOOR = 3,
  NEAREST_MODE_CEIL = 4,
};

enum ActivationType : int8_t {
  ACTIVATION_TYPE_NO_ACTIVATION = 0,
  ACTIVATION_TYPE_RELU = 1,
  ACTIVATION_TYPE_SIGMOID = 2,
  ACTIVATION_TYPE_RELU6 = 3,
  ACTIVATION_TYPE_ELU = 4,
  ACTIVATION_TYPE_LEAKY_RELU = 5,
  ACTIVATION_TYPE_ABS = 6,
  ACTIVATION_TYPE_RELU1 = 7,
  ACTIVATION_TYPE_SOFTSIGN = 8,
  ACTIVATION_TYPE_SOFTPLUS = 9,
  ACTIVATION_TYPE_TANH = 10,
  ACTIVATION_TYPE_SELU = 11,
  ACTIVATION_TYPE_HSWISH = 12,
  ACTIVATION_TYPE_HSIGMOID = 13,
  ACTIVATION_TYPE_THRESHOLDRELU = 14,
  ACTIVATION_TYPE_LINEAR = 15,
  ACTIVATION_TYPE_HARD_TANH = 16,
  ACTIVATION_TYPE_SIGN = 17,
  ACTIVATION_TYPE_SWISH = 18,
  ACTIVATION_TYPE_GELU = 19,
  ACTIVATION_TYPE_UNKNOWN = 20,
};

enum ReduceMode : int8_t {
  REDUCE_MODE_MEAN = 0,
  REDUCE_MODE_MAX = 1,
  REDUCE_MODE_MIN = 2,
  REDUCE_MODE_PROD = 3,
  REDUCE_MODE_SUM = 4,
  REDUCE_MODE_SUM_SQUARE = 5,
  REDUCE_MODE_ASUM = 6,
  REDUCE_MODE_ALL = 7,
  REDUCE_MODE_L2 = 8,
};

enum PoolMode : int8_t {
  POOL_MODE_MAX_POOLING = 0,
  POOL_MODE_MEAN_POOLING = 1,
};

enum EltwiseMode : int8_t {
  ELTWISE_MODE_PROD = 0,
  ELTWISE_MODE_SUM = 1,
  ELTWISE_MODE_MAXIMUM = 2,
  ELTWISE_MODE_UNKNOWN = 3,
};

enum PadMode : int8_t {
  PAD_MODE_PAD = 0,
  PAD_MODE_SAME = 1,
  PAD_MODE_VALID = 2,
};

enum RoundMode : int8_t {
  ROUND_MODE_FLOOR = 0,
  ROUND_MODE_CEIL = 1,
};

enum PaddingMode : int8_t {
  PADDING_MODE_CONSTANT = 0,
  PADDING_MODE_REFLECT = 1,
  PADDING_MODE_SYMMETRIC = 2,
  PADDING_MODE_RESERVED = 3,
};

enum LshProjectionType : int8_t {
  UNKNOWN = 0,
  SPARSE = 1,
  DENSE = 2,
};

enum Reduction : int8_t {
  REDUCTION_SUM = 0,
  MEAN = 1,
  NONE = 2,
};

struct Attribute {
  std::string name;
  uint32_t data;
};
}  // namespace lite
}  // namespace mindspore
#endif  // MIDIR_LITE_TYPES_H
